package com.mzy.olddate.test;

import java.util.ArrayList;

/**
 * @author Ives
 * * @date 2021/9/10
 */
public class Demo {
  public static void main(String[] args) {
    String s ="123456781234567812345678";
    String substring = s.substring(12);
    String substring1 = s.substring(0, 12);
    System.out.println(substring1);

    System.out.println(substring);

    StringBuilder stringBuilder1 = new StringBuilder();
    stringBuilder1.append(substring);
    System.out.println(stringBuilder1.append(substring1).toString());

    ArrayList<String> list = new ArrayList<>();
    list.add("123");
    list.add("456");
    list.add("789");
    System.out.println(list);
    for (String item:
         list) {
      System.out.println(item);
    }
  }
}
